import React, {Component} from 'react'
import ActivityVM from 'cvm/post/activity'
import { observer } from 'mobx-react/custom'
import PostList from 'components/post/postList'
import Refresh from 'components/common/refresh'

@observer
export default class Activity extends Component {
  vm = new ActivityVM(this.props)
  constructor (props) {
    super(props)
    window.document.title = '活动'
  }
  render () {
    return (
      <div>
        <Refresh onRefresh={this.vm.postListVM.data.length > 5 && this.vm.postListVM.handleRefresh}>
          {<PostList vm={this.vm.postListVM} />}
        </Refresh>
      </div>
    )
  }
}
